{include file="common/_meta" /}
<title>权限管理</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 管理员管理 <span class="c-gray en">&gt;</span> 权限管理 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
	<div class="text-c">
		<form class="Huiform" method="post" action="" target="_self">
			<input type="text" class="input-text" style="width:250px" placeholder="权限名称" id="" name="">
			<button type="submit" class="btn btn-success" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜索节点</button>
		</form>
	</div>
	<div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="l"><a href="javascript:;" onclick="addnode()" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i> 权限节点</a></span> <span class="r">共有数据：<strong>54</strong> 条</span> </div>
	<table class="table table-border table-bordered table-bg">
		<thead>
			<tr>
				<th scope="col" colspan="7">权限节点</th>
			</tr>
			<tr class="text-c">
				<th width="25"><input type="checkbox" name="" value=""></th>
				<th width="40">ID</th>
				<th width="200">权限名称</th>
				<th>节点类型</th>
				<th>字段名</th>
				<th width="100">操作</th>
			</tr>
		</thead>
		<tbody>
			{volist name="list" id="vo"}
				<tr class="text-c">
					<td><input type="checkbox" value="1" name=""></td>
					<td>{$vo.id}</td>
					<td>{$vo.title}</td>
					<td>菜单</td>
					<td>{$vo.name}</td>
					<td><a title="编辑" href="javascript:;" onclick="admin_permission_edit('角色编辑','admin-permission-add.html','1','','310')" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6df;</i></a> <a title="删除" href="javascript:;" onclick="admin_permission_del(this,'1')" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6e2;</i></a></td>
				</tr>
				{volist name="vo['child']" id="sub"}
                      <tr class="text-c">
                        <td><input type="checkbox" value="1" name=""></td>
						<td>{$sub.id}</td>
                        <td> ∟ {$sub.title}</td>
                        <td>URL</td>
                        <td>{$sub.name}</td>
                        <td><a title="编辑" href="javascript:;" onclick="admin_permission_edit('角色编辑','admin-permission-add.html','1','','310')" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6df;</i></a> <a title="删除" href="javascript:;" onclick="admin_permission_del(this,'1')" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6e2;</i></a></td>
                      </tr>
              	{/volist}
			{/volist}
		</tbody>
	</table>

	<!-- 添加节点 -->
	<div id="addnode" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
			<div class="modal-dialog">
				<div class="modal-content radius">
					<div class="modal-header">
						<h3 class="modal-title">添加节点</h3>
						<a class="close" data-dismiss="modal" aria-hidden="true" href="javascript:void();">×</a>
					</div>
					<div class="modal-body">
						<article class="page-container" style="padding-right: 10%;">
							<form action="" method="post" class="form form-horizontal" id="form-accedit">
								<div class="row cl">
									<label class="form-label col-xs-4 col-sm-3">节点名称：</label>
									<div class="formControls col-xs-8 col-sm-9">
										<input  type="text"  name="title" class="input-text" autocomplete="off">
									</div>
								</div>
								<div class="row cl">
									<label class="form-label col-xs-4 col-sm-3">节点URL：</label>
									<div class="formControls col-xs-8 col-sm-9">
										<input  type="text"  name="name" class="input-text" autocomplete="off">
									</div>
								</div>
								<div class="row cl">
									<label class="form-label col-xs-4 col-sm-3">节点类型：</label>
									<div class="formControls col-xs-8 col-sm-9 skin-minimal">
										<div class="radio-box">
											<input name="type" type="radio" value="1" id="">
											<label for="sex-1">URL</label>
										</div>
										<div class="radio-box">
											<input type="radio" value="2" id="" name="type">
											<label for="sex-2" class="">菜单</label>
										</div>
									</div>
								</div>
								<div class="row cl">
									<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
										<input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
									</div>
								</div>
							</form>
						</article>
					</div>
				</div>
			</div>
	</div>


</div>
{include file="common/_footer"/}
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="/static/admin/lib/datatables/1.10.0/jquery.dataTables.min.js"></script> 
<script type="text/javascript">

// 添加银行账户
function addnode(){
	$("#addnode").modal("show");
}

$(':submit').click(function(){
	$.post("{:url('Admin/authRule')}",$('form').serialize()).success(function(data){
		layer.msg(data.msg);
		if(data.code){
			setTimeout(function(){
				history.go(0);
			},500);
		}
	});
	return false;
});

</script>
</body>
</html>